<template>
  <el-tabs v-model="activeName" style="padding-left: 18px;" @tab-click="tabClick">
    <el-tab-pane label="excel生成sql语句" name="first">
      <Excel ref="excelMysql"/>
    </el-tab-pane>
    <el-tab-pane label="Zip压缩包生成" name="second">
      <Zip ref="zipMysql"/>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
    import Zip from './zipMysql/index'
    import Excel from './excelMysql/index'
    import '@/styles/description.scss'

    export default {
        name: 'excelMysql',
        components: {Excel, Zip},
        data() {
            return {
                activeName: 'first'
            }
        },
        methods: {
            tabClick(name) {
                if (this.activeName === 'first') {
                    this.$refs.excelMysql.init()
                } else if (this.activeName === 'second') {
                    this.$refs.zipMysql.init()
                } else {
                    this.$refs.excelMysql.init()
                }
            }
        }
    }
</script>

<style scoped>
</style>
